

import { getSDK } from "../SDKDefine";
import SDKAdatper from "../adapter/core/SDKAdatper";
import BindFunction from "../utils/BindFunction";
export default class SDKBase {
    protected _sdk: SDKAdatper;
    protected funcHelper: BindFunction = new BindFunction()
    get sdk() {
        if (!this._sdk) {
            this._sdk = getSDK();
        }
        return this._sdk;
    }

    bind(func: Function) {
        return this.funcHelper.bind(func, this)
    }

    unbind(func: Function) {
        return this.funcHelper.unbind(func, this)
    }
}
